
package util;
public class Result {

    public Result(){
    }

    public Result(int code,String nessage){
        this.code = code;
        this.nessage = nessage;
    }

    public Result(int code,String nessage,Object data){
        this.code = code;
        this.nessage = nessage;
        this.data = data;
    }

    private int code;//状态码;  0:成功  1:失败
    private String nessage;//错误信息

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    private Object data;

    public int getCode() {
        return code;
    }

    public String getNessage() {
        return nessage;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setNessage(String nessage) {
        this.nessage = nessage;
    }

    public static Result sceess(){
        return new Result(0,"操作成功");
    }

    public static Result fail(){
        return new Result(1,"操作失败");
    }
}

